LOCAL_PATH := $(call my-dir)
      
include $(CLEAR_VARS)

LOCAL_MODULE    := nxengine
SRCDIR := $(shell readlink $(LOCAL_PATH)/src)src
LOCAL_ARM_MODE := arm
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../SDL/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../sdl_ttf/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/ai
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/autogen
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/common
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/endgame
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/extract
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/graphics
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/intro
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/nxce
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/pause
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/platform
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/profiles
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/siflib
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/sound
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/TextBox
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../nxengine/src/tools

LOCAL_SRC_FILES := \
    $(SRCDIR)/ai/ai.cpp \
$(SRCDIR)/ai/almond/almond.cpp \
$(SRCDIR)/ai/balrog_common.cpp \
$(SRCDIR)/ai/boss/balfrog.cpp \
$(SRCDIR)/ai/boss/ballos.cpp \
$(SRCDIR)/ai/boss/core.cpp \
$(SRCDIR)/ai/boss/heavypress.cpp \
$(SRCDIR)/ai/boss/ironhead.cpp \
$(SRCDIR)/ai/boss/omega.cpp \
$(SRCDIR)/ai/boss/sisters.cpp \
$(SRCDIR)/ai/boss/undead_core.cpp \
$(SRCDIR)/ai/boss/x.cpp \
$(SRCDIR)/ai/egg/egg.cpp \
$(SRCDIR)/ai/egg/egg2.cpp \
$(SRCDIR)/ai/egg/igor.cpp \
$(SRCDIR)/ai/final_battle/balcony.cpp \
$(SRCDIR)/ai/final_battle/doctor.cpp \
$(SRCDIR)/ai/final_battle/doctor_common.cpp \
$(SRCDIR)/ai/final_battle/doctor_frenzied.cpp \
$(SRCDIR)/ai/final_battle/final_misc.cpp \
$(SRCDIR)/ai/final_battle/misery.cpp \
$(SRCDIR)/ai/final_battle/sidekicks.cpp \
$(SRCDIR)/ai/first_cave/first_cave.cpp \
$(SRCDIR)/ai/hell/ballos_misc.cpp \
$(SRCDIR)/ai/hell/ballos_priest.cpp \
$(SRCDIR)/ai/hell/hell.cpp \
$(SRCDIR)/ai/IrregularBBox.cpp \
$(SRCDIR)/ai/last_cave/last_cave.cpp \
$(SRCDIR)/ai/maze/balrog_boss_missiles.cpp \
$(SRCDIR)/ai/maze/critter_purple.cpp \
$(SRCDIR)/ai/maze/gaudi.cpp \
$(SRCDIR)/ai/maze/labyrinth_m.cpp \
$(SRCDIR)/ai/maze/maze.cpp \
$(SRCDIR)/ai/maze/pooh_black.cpp \
$(SRCDIR)/ai/npc/balrog.cpp \
$(SRCDIR)/ai/npc/curly.cpp \
$(SRCDIR)/ai/npc/curly_ai.cpp \
$(SRCDIR)/ai/npc/misery.cpp \
$(SRCDIR)/ai/npc/npcguest.cpp \
$(SRCDIR)/ai/npc/npcplayer.cpp \
$(SRCDIR)/ai/npc/npcregu.cpp \
$(SRCDIR)/ai/oside/oside.cpp \
$(SRCDIR)/ai/plantation/plantation.cpp \
$(SRCDIR)/ai/sand/curly_boss.cpp \
$(SRCDIR)/ai/sand/puppy.cpp \
$(SRCDIR)/ai/sand/sand.cpp \
$(SRCDIR)/ai/sand/toroko_frenzied.cpp \
$(SRCDIR)/ai/sym/smoke.cpp \
$(SRCDIR)/ai/sym/sym.cpp \
$(SRCDIR)/ai/village/balrog_boss_running.cpp \
$(SRCDIR)/ai/village/ma_pignon.cpp \
$(SRCDIR)/ai/village/village.cpp \
$(SRCDIR)/ai/weapons/blade.cpp \
$(SRCDIR)/ai/weapons/bubbler.cpp \
$(SRCDIR)/ai/weapons/fireball.cpp \
$(SRCDIR)/ai/weapons/missile.cpp \
$(SRCDIR)/ai/weapons/nemesis.cpp \
$(SRCDIR)/ai/weapons/polar_mgun.cpp \
$(SRCDIR)/ai/weapons/snake.cpp \
$(SRCDIR)/ai/weapons/spur.cpp \
$(SRCDIR)/ai/weapons/weapons.cpp \
$(SRCDIR)/ai/weapons/whimstar.cpp \
$(SRCDIR)/ai/weed/balrog_boss_flying.cpp \
$(SRCDIR)/ai/weed/frenzied_mimiga.cpp \
$(SRCDIR)/ai/weed/weed.cpp \
$(SRCDIR)/autogen/AssignSprites.cpp \
$(SRCDIR)/autogen/objnames.cpp \
$(SRCDIR)/caret.cpp \
$(SRCDIR)/common/BList.cpp \
$(SRCDIR)/common/bufio.cpp \
$(SRCDIR)/common/DBuffer.cpp \
$(SRCDIR)/common/DString.cpp \
$(SRCDIR)/common/InitList.cpp \
$(SRCDIR)/common/misc.cpp \
$(SRCDIR)/common/stat.cpp \
$(SRCDIR)/common/StringList.cpp \
$(SRCDIR)/console.cpp \
$(SRCDIR)/debug.cpp \
$(SRCDIR)/endgame/credits.cpp \
$(SRCDIR)/endgame/CredReader.cpp \
$(SRCDIR)/endgame/island.cpp \
$(SRCDIR)/endgame/misc.cpp \
$(SRCDIR)/extract/crc.cpp \
$(SRCDIR)/extract/extract.cpp \
$(SRCDIR)/extract/extractfiles.cpp \
$(SRCDIR)/extract/extractpxt.cpp \
$(SRCDIR)/extract/extractstages.cpp \
$(SRCDIR)/floattext.cpp \
$(SRCDIR)/game.cpp \
$(SRCDIR)/graphics/font.cpp \
$(SRCDIR)/graphics/graphics.cpp \
$(SRCDIR)/graphics/nxsurface.cpp \
$(SRCDIR)/graphics/safemode.cpp \
$(SRCDIR)/graphics/sprites.cpp \
$(SRCDIR)/graphics/tileset.cpp \
$(SRCDIR)/input.cpp \
$(SRCDIR)/intro/intro.cpp \
$(SRCDIR)/intro/title.cpp \
$(SRCDIR)/inventory.cpp \
$(SRCDIR)/main.cpp \
$(SRCDIR)/map.cpp \
$(SRCDIR)/map_system.cpp \
$(SRCDIR)/niku.cpp \
$(SRCDIR)/object.cpp \
$(SRCDIR)/ObjManager.cpp \
$(SRCDIR)/pause/dialog.cpp \
$(SRCDIR)/pause/message.cpp \
$(SRCDIR)/pause/objects.cpp \
$(SRCDIR)/pause/options.cpp \
$(SRCDIR)/pause/pause.cpp \
$(SRCDIR)/player.cpp \
$(SRCDIR)/playerstats.cpp \
$(SRCDIR)/profile.cpp \
$(SRCDIR)/p_arms.cpp \
$(SRCDIR)/replay.cpp \
$(SRCDIR)/screeneffect.cpp \
$(SRCDIR)/settings.cpp \
$(SRCDIR)/siflib/sectSprites.cpp \
$(SRCDIR)/siflib/sectStringArray.cpp \
$(SRCDIR)/siflib/sif.cpp \
$(SRCDIR)/siflib/sifloader.cpp \
$(SRCDIR)/slope.cpp \
$(SRCDIR)/sound/org.cpp \
$(SRCDIR)/sound/pxt.cpp \
$(SRCDIR)/sound/sound.cpp \
$(SRCDIR)/sound/sslib.cpp \
$(SRCDIR)/stageboss.cpp \
$(SRCDIR)/stagedata.cpp \
$(SRCDIR)/statusbar.cpp \
$(SRCDIR)/TextBox/ItemImage.cpp \
$(SRCDIR)/TextBox/SaveSelect.cpp \
$(SRCDIR)/TextBox/StageSelect.cpp \
$(SRCDIR)/TextBox/TextBox.cpp \
$(SRCDIR)/TextBox/YesNoPrompt.cpp \
$(SRCDIR)/tools/extractmapinfo.c \
$(SRCDIR)/trig.cpp \
$(SRCDIR)/tsc.cpp \
$(SRCDIR)/../../SDL/src/main/android/SDL_android_main.cpp \

LOCAL_CFLAGS := -O3 -Wreturn-type -Wunused-variable -Wno-multichar -mfloat-abi=softfp -Wa,-march=armv7a -mfpu=neon -fsigned-char -ffast-math

LOCAL_SHARED_LIBRARIES := SDL sdl_ttf sdl_gfx sdl_mixer

LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog  

include $(BUILD_SHARED_LIBRARY)  
